Movable barrier operator having force and position learning capability

ABSTRACT

A movable barrier operator includes a wall control switch module having a learn switch thereon. The switch module is connectable to a control unit positioned in a head of a garage movable barrier operator. The head unit also contains an electric motor which is connected to a transmission for opening and closing a movable barrier such as a garage door. The switch module includes a plurality of switches coupled to capacitors which, when closed, have varying charge and discharge times to enable which switch has been closed. The control unit includes an automatic force incrementing system for adjusting the maximal opening and closing force to be placed upon the movable barrier during a learn operation. Likewise, end of travel limits can also be set during a learn operation upon installation of the unit. The movable barrier operator also includes an ambient temperature sensor which is used to derive a motor temperature signal, which motor temperature signal is measured and is used to inhibit motor operation when further motor operation exceeds or is about to exceed set point temperature limits. 
     CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation of prior application No. 08/467,039, filed Jun.6, 1995, now abandoned.

This application includes a microfiche appendix of a source code listingincluding 1 microfiche having 94 frames.

BACKGROUND OF THE INVENTION

The invention relates in general to a movable barrier operator foropening and closing a movable barrier or door. More particularly, theinvention relates to a garage door operator that can learn force andtravel limits when installed and can simulate the temperature of itselectric motor to avoid motor failure during operation.

A number of garage door operators have been sold over the years. Mostgarage door operators include a head unit containing a motor having atransmission connected to it, which may be a chain drive or a screwdrive, which is coupled to a garage door for opening and closing thegarage door. Such garage door openers also have included opticaldetection systems located near the bottom of the travel of the door toprevent the door from closing on objects or on persons that may be inthe path of the door. Such garage door operators typically include awall control which is connected via one or more wires to the head unitto send signals to the head unit to cause the head unit to open andclose the garage door, to light a worklight or the like. Such prior artgarage door operators also include a receiver and head unit forreceiving radio frequency transmissions from a hand-held codetransmitter or from a keypad transmitter which may be affixed to theoutside of the garage or other structure. These garage door operatorstypically include adjustable limit switches which cause the garage doorto operate or to halt the motor when the travel of the door causes thelimit switch to change state which may either be in the up position orin the down position. This prevents damage to the door as well as damageto the structure supporting the door. It may be appreciated, however,that with different size garages and different size doors, the limits oftravel must be custom set once the unit is placed within the garage. Inthe past, such units have had mechanically adjustable limit switcheswhich are typically set by an installer. The installer must go back andforth between the door, the wall switch and the head unit in order tomake the adjustment. This, of course, is time consuming and results inthe installer being forced to spend more time than is desirable toinstall the garage door operator.

A number of requirements are in existence from Underwriter'sLaboratories, the Consumer Product Safety Commission and the like whichrequire that garage door operators sold in the United States must, whenin a closing mode and contacting an obstruction having a height of morethan one inch, reverse and open the door in order to prevent damage toproperty and injury to persons. Prior art garage door operators alsoincluded systems whereby the force which the electric motor applied tothe garage door through the transmission might be adjusted. Typically,this force is adjusted by a licensed repair technician or installer whoobtained access to the inside of the head unit and adjusts a pair ofpotentiometers, one of which sets the maximal force to be applied duringthe closing portion of door operation, the other of which establishesthe maximum force to be applied during the opening of door operation.

Such a garage door operator is exemplified by an operator taught in U.S.Pat. No. 4,638,443 to Schindler. However, such door operators arerelatively inconvenient to install and invite misuse because thehomeowner, using such a garage door operator, if the garage dooroperator begins to bind or jam in the tracks, may likely obtain accessto the head unit and increase the force limit. Increasing the maximalforce may allow the door to move passed a binding point, but apply themaximal force at the bottom of its travel when it is almost closedwhere, of course, it should not.

Another problem associated with prior art garage door operators is thatthey typically use electric motors having thermostats connected inseries with portions of their windings. The thermostats are adapted toopen when the temperature of the winding exceeds a preselected limit.The problem with such units is that when the thermostats open, the doorthen stops in whatever position it is then in and can neither be openedor closed until the motor cools, thereby preventing a person fromexiting a garage or entering the garage if they need to.

SUMMARY OF THE INVENTION

The present invention is directed to a movable barrier operator whichincludes a head unit having an electric motor positioned therein, themotor being adapted to drive a transmission connectable to the motor,which transmission is connectable to a movable barrier such as a garagedoor. A wired switch is connectable to the head unit for commanding thehead unit to open and close the door and for commanding a controllerwithin the head unit to enter a learn mode. The controller includes amicrocontroller having a non-volatile memory associated with it whichcan store force set points as well as digital end of travel positionswithin it. When the controller is placed in learn mode by appropriateswitch closure from the wall switch, the door is caused to cycle openand closed. The force set point stored in the non-volatile memory is arelatively low set point and if the door is placed in learn mode and thedoor reaches a binding position, the set point will be changed byincreasing the set point to enable the door to travel through thebinding area. Thus, the set points will be dynamically adjusted as thedoor is in the learn mode, but the set points will not be changeableonce the door is taken out of the learn mode, thereby preventing theforce set point from being inadvertently increased, which might lead toproperty damage or injury. Likewise, the end of travel positions can beadjusted automatically when in the learn mode because if the door ishalted by the controller, when the controller senses that the doorposition has reached the previously set end of travel position, the doorwill then be commanded by a button push from the wall switch to keeptravelling in the same direction, thereby incrementing or changing. Theend of travel limits are set by pushing the learn button on the wallswitch which causes the door to travel upward and continue travellingupward until the door has travelled as far as the installer wishes it totravel. The installer disables the learn switch by lifting his hand fromthe button. The up limit is then stored and the door is then movedtoward the closed position. A pass point or position normalizing systemconsisting of a ring-like light interrupter attached to the garage doorcrosses the light path of an optical obstacle detector signallinginstantaneously the position of the door and the door continues until itcloses, whereupon force sensing in the door causes an auto-reverse totake place and then raises the door to the up position, the learn modehaving been completed and the door travel limits having been set.

The movable barrier operator also includes a combination of atemperature sensor and microcontroller. The temperature sensor sensesthe ambient temperature within the head unit because it is positioned inproximity with the electric motor. When the electric motor is operated,a count is incremented in the microcontroller which is multiplied by aconstant which is indicative of the speed at which the motor is moving.This incremented multiplied count is then indicative of the rise intemperature which the motor has experienced by being operated. The counthas subtracted from it the difference between the simulated temperatureand the ambient temperature and the amount of time which the motor hasbeen switched off. The totality of which is multiplied by a constant.The remaining count then is an indication of the extant temperature ofthe motor. In the event that the temperature, as determined by themicrocontroller, is relatively high, the unit provides a predictivefunction in that if an attempt is made to open or close the garage door,prior to the door moving, the microcontroller will make a determinationas to whether the single cycling of the door will add additionaltemperature to the motor causing it to exceed a set point temperatureand, if so, will inhibit operation of the door to prevent the motor frombeing energized so as to exceed its safe temperature limit.

The movable barrier operator also includes light emitting diodes forproviding an output indication to a user of when a problem may have beenencountered with the door operator. In the event that further operationof the door operator will cause the motor to exceed its set pointtemperature, an LED will be illuminated as a result of themicrocontroller temperature prediction indicating to the user that themotor is not operating because further operation will cause the motor toexceed its safe temperature limits.

It is a principal aspect of the present invention to provide a movablebarrier operator which is able to quickly and automatically select endof travel positions.

It is another aspect of the present invention to provide a movablebarrier operator which, upon installation, is able to quickly establishup and down force set points.

It is still another aspect of the present invention to provide a movablebarrier operator which can determine the temperature of the motor basedupon motor history and the ambient temperature of the head unit.

Other aspects and advantages of the invention will become obvious to oneof ordinary skill in the art upon a perusal of the followingspecification and claims in light of the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of a garage having mounted within it agarage door operator embodying the present invention;

FIG. 2 is a block diagram of a controller mounted within the head unitof the garage door operator employed in the garage door operator shownin FIG. 1;

FIG. 3 is a schematic diagram of the controller shown in block format inFIG. 2;

FIG. 4 is a schematic diagram of a receiver module shown in theschematic diagram of FIG. 3;

FIGS. 5A-B are a flow chart of a main routine that executes in amicrocontroller of the control unit;

FIGS. 6A-G are a flow diagram of a learn routine executed by themicrocontroller;

FIGS. 7A-B are flow diagrams of a timer routine executed by themicrocontroller;

FIGS. 8A-B are flow diagrams of a state routine representative of thecurrent and recent state of the electric motor;

FIGS. 9A-B are a flow chart of a tachometer input routine and alsodetermines the position of the door on the basis of the pass pointsystem and input from the optical obstacle detector;

FIGS. 10A-C are flow charts of the switch input routines from the switchmodule; and

FIG. 11 is a schematic diagram of the switch module and the switchbiasing circuit.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring now to the drawings and especially to FIG. 1, morespecifically a movable barrier door operator or garage door operator isgenerally shown therein and referred to by numeral 10 includes a headunit 12 mounted within a garage 14. More specifically, the head unit 12is mounted to the ceiling of the garage 14 and includes a rail 18extending therefrom with a releasable trolley 20 attached having an arm22 extending to a multiple paneled garage door 24 positioned formovement along a pair of door rails 26 and 28. The system includes ahand-held transmitter unit 30 adapted to send signals to an antenna 32positioned on the head unit 12 and coupled to a receiver as will appearhereinafter. An external control pad 34 is positioned on the outside ofthe garage having a plurality of buttons thereon and communicates viaradio frequency transmission with the antenna 32 of the head unit 12. Aswitch module 39 is mounted on a wall of the garage. The switch module39 is connected to the head unit by a pair of wires 39a. The switchmodule 39 includes a learn switch 39b, a light switch 39c, a lock switch39d and a command switch 39e. An optical emitter 42 is connected via apower and signal line 44 to the head unit 12. An optical detector 46 isconnected via a wire 48 to the head unit 12. A pass point detector 49comprising a bracket 49a and a plate structure 49b extending from thebracket has a substantially circular aperture 49c formed in the bracket,which aperture might also be square or rectangular. The pass pointdetector is arranged so that it interrupts the light beam on a bottomleg 49d and allows the light beam to pass through the aperture 49c. Thelight beam is again interrupted by the leg 49e, thereby signalling thecontroller via the optical detector 46 that the pass point detectorattached to the door has moved past a certain position allowing thecontroller to normalize or zero its position, as will be appreciated inmore detail hereinafter.

As shown in FIGS. 2 and 3, the garage door operator 10, which includesthe head unit 12 has a controller 70 which includes the antenna 32. Thecontroller 70 includes a power supply 72 which receives alternatingcurrent from an alternating current source, such as 110 volt AC, andconverts the alternating current to +5 volts zero and 24 volts DC. The 5volt supply is fed along a line 74 to a number of other elements in thecontroller 70. The 24 volt supply is fed along the line 76 to otherelements of the controller 70. The controller 70 includes asuper-regenerative receiver 80 coupled via a line 82 to supplydemodulated digital signals to a microcontroller 84. The receiver isenergized by a line 86 coupled to the line 74. The microcontroller 84 isalso coupled by a bus 87 to a non-volatile memory 88, which non-volatilememory stores set points and other customized digital data related tothe operation of the control unit. An obstacle detector 90, whichcomprises the emitter 42 and infrared detector 46 is coupled via anobstacle detector bus 92 to the microcontroller 84. The obstacledetector bus 92 includes lines 44 and 48. The wall switch 39 isconnected via the connecting wires 39a to a switch biasing module 96which is powered from the 5 volt supply line 74 and supplies signals toand is controlled by the microcontroller 84 via a bus 100 coupled to themicrocontroller 84. The microcontroller 84, in response to switchclosures, will send signals over a relay logic line 102 to a relay logicmodule 104 connected to an alternating current motor 106 having a powertake-off shaft 108 coupled to the transmission 18 of the garage dooroperator. A tachometer 110 is coupled to the shaft 108 and provides atachometer signal on a tachometer line 112 to the microcontroller 84,the tachometer signal being indicative of the speed of rotation of themotor.

The power supply 72 includes a transformer 130 which receivesalternating current on leads 132 and 134 from an external source ofalternating current. The transformer steps down the voltage to 24 voltsand feeds 24 volts to a pair of capacitors 138 and 140 which provide afiltering function. A 24 volt filtered DC potential is supplied on theline 76 to the relay logic 104. The potential is fed through a resistor142 across a pair of filter capacitors 144 and 146, which are connectedto a 5 volt voltage regulator 150, which supplies regulated 5 voltoutput voltage across a capacitor 152 and a Zener diode 154 to the line74.

Signals may be received by the controller at the antenna 32 and fed tothe receiver 80. The receiver 80 includes a pair of inductors 170 and172 and a pair of capacitors 174 and 176 that provide impedance matchingbetween the antenna 32 and other portions of the receiver. An NPNtransistor 178 is connected in common base configuration as a bufferamplifier. Bias to the buffer amplifier transistor 178 is provided byresistors 180 and 181. A resistor 188, a capacitor 190, a capacitor 192and a capacitor 194 provide filtering to isolate a later receiver stagefrom the buffer amplifier 178. An inductor 196 also provides powersupply buffering. The buffered RF output signal is supplied on a line200, coupled between the collector of the transistor 178 and a receivermodule 202 which is shown in FIG. 4. The lead 204 feeds into the unit202 and is coupled to a biasing resistor 220. The buffered radiofrequency signal is fed via a coupling capacitor 222 to a tuned circuit224 comprising a variable inductor 226 connected in parallel with acapacitor 228. Signals from the tuned circuit 224 are fed on a line 230to a coupling capacitor 232 which is connected to an NPN transistor 234at its base 236. The transistor has a collector 240 and emitter 242. Thecollector 240 is connected to a feedback capacitor 246 and a feedbackresistor 248. The emitter is also coupled to the feedback capacitor 246and to a capacitor 250. The line 210 is coupled to a choke inductor 256which provides ground potential to a pair of resistors 258 and 260 aswell as a capacitor 262. The resistor 258 is connected to the base 236of the transistor 234. The resistor 260 is connected via an inductor 264to the emitter 242 of the transistor. The output signal from thetransistor is fed outward on a line 212 to an electrolytic capacitor270.

As shown in FIG. 3, the capacitor 270 capacitively couples thedemodulated radio frequency signal to a bandpass amplifier 280 to anaverage detector 282 which feeds a comparator 284. The comparator 284also receives a signal directly from the bandpass amplifier 280 andprovides a demodulated digital output signal on the line 82 coupled tothe P32 pin of the Z86E21/61 microcontroller 84. The microcontroller 84is energized by the power supply 72 and also controlled by the wallswitch 39 coupled to the microcontroller by the leads 100.

From time to time, the microcontroller will supply current to the switchbiasing module 96.

The microcontroller operates under the control of a main routine asshown in FIGS. 5A and 5B. When the unit is powered up, a power on resetis performed in a step 300, the memory is cleared and a check sum fromread-only memory within the microcontroller 84 is tested. In a step 302,if the check sum and the memory prove to be correct, control istransferred to a step 304, if not, control is transferred back to thestep 300. The last non-volatile state, which is indicative of the stateof the operator, that is whether the operator indicated the door was atits up limit, down limit or in the middle of its travel, is tested forin a step 304 and if the last state is a down limit, control istransferred to a step 306. If it was an up limit, control is transferredto a step 308. If it was neither a down nor an up limit, control istransferred to a step 310. In the step 306, the position is set as thedown limit value and a window flag is set. The operation state is set asdown limit. In a step 308, the position is set as up, the window flag isset and the operation state is set as up limit. In the step 310, theposition is set as outside the normal range, 6 inches below thesecondary up limit. The operation state is set as stopped. Control istransferred from any of steps 306, 308 and 310 to a step 312 where astored simulated motor temperature is read from the non-volatile memory88. The temperature of a printed circuit board positioned within thehead unit is read from the temperature sensor 120 which is supplied overa line 120a to the microcontroller. In order to read the PC boardtemperature, a pin P20 of the microprocessor 84 is driven high, causinga high potential to appear on a line 120b which supplies a currentthrough the RTD sensor 120 to a comparator 120c. A capacitor 120dconnected to the comparator and to the temperature sensor, is groundedand charges up. The other input terminal to the comparator has a voltagedivider 120e connected to it to supply a reference voltage of about 2.5volts. Thus, the microcontroller starts a timer running when it bringsline 120b high and interrogates a line 120f to determine its state. Theline 120f will be driven high when the temperature at the junction ofthe RTD 120 and the capacitor 120d exceeds 2.5 volts. Thus, the timethat it takes to charge the capacitor through the resistance isindicative of the temperature within the head unit and, in this manner,the PC board temperature is read and if the temperature as read isgreater than the temperature retrieved from the non-volatile memory, thetemperature read from the PC board is then stored as the motortemperature.

In a step 314, constants related to the receipt and processing of thedemodulated signal on the line 82 are initialized. In a step 316, a testis made to determine whether the learn switch 39b had been activatedwithin the last 30 seconds. If it has not, control is transferred backto the step 314.

In a step 318, a test is made to determine whether the command switchdebounce timer has expired. If it has, control is transferred to a step320. If it is not, control is transferred back to the step 314. In thestep 320, the learn limit cycle is begun as will be discussed in moredetail as to FIGS. 6A through 6G. The main routine effectively has anumber of interrupt routines coupled to it. In the event that a fallingedge is detected on the line 112 from the tachometer, an interruptroutine related to the tachometer is serviced in the step 322. A timerinterrupt occurs every 0.5 millisecond in a step 324 as shown in FIGS.7A through 7B.

The obstacle detector 90 generates a pulse every 10 milliseconds duringthe time when the beam from the infrared emitter 42 has not beeninterrupted either by the pass point system 49 or by an obstacle, in astep 326 following which the obstacle detector timer is cleared in astep 328.

As shown in FIGS. 10A through 10C, operation of the switch biasingmodule 96 is controlled over the lines 100 by the microcontroller 84.The microcontroller 84, in the step 340, tests to determine whether anRS232 digital communications mode has been set. If it has, control istransferred to a step 342, as shown in FIG. 10C, testing whether data isstored in an output buffer to be output from the microcontroller 84. Ifit is, control is transferred to a step 344 outputting the next bit,which may include a start bit, from the output buffer and control isthen transferred back to the main routine. In the event that there is nodata in the data buffer, control is transferred to the step 346, testingwhether data is being received over lines 100. If it is being received,control is transferred to a step 348 to receive the next bit into theinput buffer and the routine is then exited. If not, control istransferred to a step 350. In the step 350, a test is made to determinewhether a start bit for RS232 signalling has been received. If it hasnot, control is transferred to a return step 352. If it has, control istransferred to a step 354 in which a flag is set indicating that thestart bit has been received and the routine is exited. As shown in FIG.10A, if the response to the decision block 340 is no, control istransferred to a decision step 360. The switch status counter isincremented and then a test is determined as to whether the contents ofthe counter are 29. If the switch counter is 29, control is transferredto a step 362 causing the counter to be zeroed. If the counter is not29, control is transferred to a step 364, testing for whether the switchstatus is equal to zero. If the switch status is equal to zero, controlis transferred to a step 366. In a step 366, a current source transistor368, shown in FIG. 11, is switched on, drawing current through resistors370 and 372 and feeding current out through a line 39a connected theretoto the switch module 39 and, more specifically, to a resistor 380, a0.10 microfarad capacitor 382, a 1 microfarad capacitor 384, a 10microfarad capacitor 386 and a switch terminal 388. The switch 39e iscoupled to the switch terminal 388. The switch 39d may be selectivelycoupled to the capacitor 386. The switch 39b may be selectively coupledto the capacitor 384. The switch 39c may be selectively coupled to thecapacitor 382. A light emitting diode 392 is connected to the resistor380. Current flows through the resistor 380 and the light emitting diode392 back to another one of the lines 39a and through a field effecttransistor 398 to ground. In step 402, the sense input on a line 100coupled to the transistor 398 is tested to determine whether the inputis high. If the input is high immediately, that is indicative of thefact that switches 39b through 39e are all open and in a step 404,debounce timers are decremented for all switches and a got switch flagis set and the routine is exited in the event that the test of step 402is negative. Control is then transferred to a step 406 testing after 10microseconds if the sense in output on the line 100 connected to thefield effect transistor 398 is high, which would be indicative of theswitch 39c having been closed. If it is high, in step 408 the worklighttimer is incremented, all other switch timers are decremented, the gotswitch flag is set and the routine is exited. In the event that thedecision in step 406 is in the negative, control is transferred to astep 410 and the routine is exited. In the event that the decision fromstep 364 is in the negative, control is transferred to a step 412wherein the switch status is tested as to whether it is equal to one. Ifit is, control is transferred to a step 414 testing whether the sensedinput on the line 100 connected to the field effect transistor is high.If it is, control is transferred to step 416 to test the got switchflag, after which in a step 418, the learn switch debouncer isincremented, all other switch counters are decremented, the got switchflag is set and the routine is exited. In the event that the answer tostep 414 or 416 is in the negative, control is transferred to a returnstep 420.

In the event that the answer to step 412 is in the negative, control istransferred to a step 422, as shown in FIG. 10B. A test is made as towhether the switch status is equal to 10. If it is, control istransferred to a step 424 where the sense out input is tested as high.

Thus, the charging rate for the capacitors which, in effect, is sensedon the line 100 connected to the field effect transistor 398 which iscoupled to ground, is indicative of which of the switches is closedbecause the switch 39c has a capacitor that charges at 10 times the rateof the capacitor 384 connected to 39b and 100 times the rate of thecapacitor 386 selectively couplable to switch 39d.

After the switch measurement has been made, the transistor 368 isswitched non-conducting by the line 368b and the field effect transistor398 is switched non-conducting by a line 450 connected to its gate. Atransistor 462, coupled via a resistor 464 to a line 466, is switchedon, biasing a transistor 468 on, causing current to flow through adiagnostic light emitting diode 470 to a field effect transistor 472which is switched on via a voltage on a line 474. In addition, thecapacitors 386, 384 and 382, which may have been charged are dischargedthrough the field effect transistor 472.

In order to perform all of the switching functions after the step 424has been executed, control is transferred to a step 510 testing whetherthe got switch flag has been cleared. If it has, control is transferredto a step 512 in which the command timer is incremented and all othertimers are decremented and the got switch flag is set and the routine isexited. If the got switch flag has not been cleared as detected in thestep 510, the routine is exited in the step 514. In the event that thesense input is measured as being high in the step 424, control istransferred to a step 516 where the vacation or lock flag counter isincremented and all other counters are decremented. The got switch flagis set and the routine is exited. In the event that the switch statusequal 10 test in the step 422 is indicated to be no, control is thentransferred to a step 520 testing whether the switch status is 11. Ifthe switch status is 11, indicating that the routine has been sweptthrough 11 times, control is transferred to a step 522 in which thefield effect transistors 398 and 472 are both switched on, providingground pads on both sides of the capacitors causing the capacitors todischarge and the routine is then exited. In the event that the step 520test is negative, control is transferred to a step 524 testing whetherthe routine has been executed 15 times. If it has, control istransferred to a step 526 to determined if the bit which controls thestatus of light emitting diode 470, the diagnostic light emitting diode,has been set. If it has not been set, control is transferred to a step528 wherein both transistors 368 and 468 are switched on and both thefield effect transistors 398 and 472 are switched off. In order to testfor short circuits between the source and drain electrodes of the fieldeffect transistors 398 and 472 which might cause false operation signalsto be supplied on the lines 100 to the microcontroller 84, resulting ininadvertent operation of the electric motor. The routine is then exited.In the event that the test in step 526 indicates that the diagnostic LEDbit has been set, control is transferred to a step 530. In the step 530,the transistors 468 and 472 are switched on allowing current to flowthrough the diagnostic LED 470. In the event that the test in step 524is negative, a test is made in a step 532 as to whether the routine hasbeen executed 26 times. If it has not, the routine is exited in a step534. If it has, both of the field effect transistors 398 and 372 areswitched on to connect all of the capacitors to ground to discharge thecapacitors and the routine is exited.

As shown in FIGS. 7A and 7B, when the timer interrupt occurs as in step324, control is transferred to a step 550 shown in FIG. 7A wherein atest is made to determine whether a 2 millisecond timer has expired. Ifit has not, control is transferred to a step 552 determining whether a500 millisecond timer has expired. If the 500 millisecond timer hasexpired, control is transferred to a step 554 testing whether power hasbeen switched on through the relay logic 104 to the electric motor 106.If the motor has been switched on, control is transferred to a step 556testing whether the motor is stalled, as indicated by the motor powerhaving been switched on and by the fact that pulses are not comingthrough on the line 112 from the tachometer 110. In the event that themotor has stalled, control is transferred to a step 558. In the step 558the existing motor temperature indication, as stored in one of theregisters of the microcontroller 84, has added to it a constant which isrelated to a motor characteristic which is added in when the motor isindicated to be stalled. In the event that the response to the step 556is in the negative, indicating that the motor is not stalled, control istransferred to a step 560 wherein the motor temperature is updated byadding a running motor constant to the motor temperature. In the eventthat the response to the test in step 554 is in the negative, indicatingthat motor power is not on and that heat is leaking out of the motor sothat the temperature will be dropping, the new motor temperature isassigned as being equal to the old motor temperature, less the quantityof the old motor temperature, minus the ambient temperature measuredfrom the RTD probe 120, the whole difference multiplied by a thermaldecay fraction which is a number.

All of steps 558, 560 and 562 exit to a step 564 which test as towhether a 15 minute timer has timed out. If the timer has timed out,control is transferred to a step 566 causing the current, or updatedmotor temperature, to be stored in a non-volatile memory 88. If the 15minute timer has not been timed out, control is transferred to a step568, as shown in FIG. 7B. Step 566 also exits to step 568. A test ismade in the step 568 to determine whether a obstacle detector interrupthas come in via step 326 causing the obstacle detector timer to havebeen cleared. If it has not, the period will be greater than 12milliseconds, indicating that the obstacle detector beam has beenblocked. If the obstacle detector beam, in fact, has been blocked,control is transferred to a step 570 to set the obstacle detector flag.

In the event that the response to step 568 is in the negative, theobstacle detector flag is cleared in the step 572 and control istransferred to a step 574. All operational timers, including radiotimers and the like are incremented and the routine is exited.

In the event that the 2 millisecond timer tested for in the step 550 hasexpired, control is transferred to a step 576 which calls a motoroperation routine. Following execution of the motor operation routine,control is transferred to the step 552. When the motor operation routineis called, as shown in FIG. 8A, a test is made in a step 580 todetermine the status of the motor operation state variable which mayindicate if the up limits or down limit has been reached. If the uplimit or the down limit have been reached, the motor is causing the doorto travel up or down, the door has stopped in mid-travel or anauto-reverse delay indicating that the motor has stopped in mid-traveland will be switching into up travel shortly. In the event that there isan auto-reverse delay, control is transferred to a step 582, when a testis made for a command from one of the radio transmitters or from thewall control unit and, if so, the state of the motor is set indicatingthat the motor has stopped in mid-travel. Control is then transferred toa step 584 in which 0.50 second timer is tested to determine whether ithas expired. If it has, the state is set to the up travel statefollowing which the routine is exited in the step 586. In the event thatthe operation state is in the up travel state, as tested for in step580, control is transferred to a step 588 testing for a command from aradio or wall control and if the command is received, the motoroperational state is changed to stop in mid-travel. Control istransferred to a step 590. If the force period indicated is longer thanthat stored in an up array location, indicated by the position of themotor. The state of the door is indicated as stopped in mid-travel.Control is then transferred to a step 592 testing whether the currentposition of the door is at the up limit, then the state of the door isset as being at the up limit and control is transferred to a step 594causing the routine to be exited, as shown in FIG. 8B.

In the event that the operational state tested for in the step 580 isindicated to be at the up limit, control is transferred to a step 596which tests for a command from the radio or wall control unit and a testis made to determine whether the motor temperature is below a set pointfor the down travel motor temperature threshold. The state is set asbeing a down travel state. If the temperature value exceeds thethreshold or set point temperature value, an output diagnostic flag isset for providing an output indication in another routine. Control isthen transferred to a step 598, causing the routine to be exited. In theevent that the down travel limit has been reached, control istransferred to a step 600 testing for whether a command has come in fromthe radio or wall control and, if it has, the state is set asauto-reverse and the auto-reverse timer is cleared. Control is thentransferred to a step 602 testing whether the force period, asindicated, is longer than the force period stored in the down travelarray for the current position of the door. Auto-reverse is then enteredat step 582 on a later iteration of the routine. Control is transferredto a step 604 to test whether the position of the door is at the downlimit position and the pass point detector has already indicated thatthe door has swept past the pass point, the state is set as a down limitstate and control is transferred to a step 606 testing for whether thedoor position is at the down limit position and testing for whether thepass point has been detected. If the pass point has not been detected,the motor operational state is set to auto-reverse, causing auto-reverseto be entered in a later routine and control is transferred to a step608, exiting the main routine.

In the event that the block 580 indicates that the door is at the downlimit, control is transferred to a step 610, testing for a command fromthe radio or wall control and testing the current motor temperature. Ifthe current motor temperature is below the up travel motor temperaturethreshold, then the motor state variable is set as equal to up travel.If the temperature is above the threshold or set point temperature, adiagnostic code flag is then set for later diagnostic output and controlis transferred to a return step 612. In the event that the motoroperational state is indicated as being stopped in mid-travel, controlis transferred to a step 614 which tests for a radio or wall controlcommand and tests the motor temperature value to determine whether it isabove or below a down travel motor temperature threshold. If the motortemperature is above the travel threshold, then the door is left stoppedin mid-travel and the routine is returned from in step 616.

In the event that the learn switch has been activated as tested for instep 316 and the command switch is being held down as indicated by thepositive result from the step 318, the learn limit cycle is entered instep 320 and transfers control to a step 630, as shown in FIG. 6A, Instep 630, the maximum force is set to a minimum value from which it canlater be incremented, if necessary. The motor up and motor downcontrollers in the relay logic 104 are disabled. The relay logic 104includes an NPN transistor 700 coupled to line 76 to receive 24 to 28volts therefrom via a coil 702 of a relay 704 having relay contacts 706.A transistor 710 coupled to the microcontroller is also coupled to line76 via a relay coil 714 and together comprise an up relay 718 which isconnected via a lead 720 to the electric motor 106. A down transistor730 is coupled via a coil 732 to the power supply 76. The down relay 732has an armature 734 associated with it and is connected to the motor todrive it down. Respective diodes 740 and 742 are connected across coils714 and 732 to provide protection when the transistors 710 and 730 areswitched off. In the step 632, both the transistors 710 and 730 areswitched off, interrupting either up motor power or down motor power tothe electric motor 106 and the microcontroller delays for 0.50 second.Control is then transferred to a step 634, causing the relay 704 to beswitched on, delivering power to an electric light or worklight 750associated with the head unit. The up motor relay 716 is switched on. A1 second timer is also started which inhibits testing of force limitsdue to the inertia of the door as it begins moving. Control is thentransferred to a step 636, testing for whether the 1 second timer hastimed out and testing for whether the force period is longer than theforce limit setting. If both conditions have occurred, control istransferred to a step 640 as shown in FIG. 6B. If either the 1 secondtimer has not timed out or the force period is not longer than the forcelimit setting, control is transferred to a step 638 which tests whetherthe command switch is still being held down. If it is, control istransferred back to step 636. If it is not, control is transferred tothe step 640. In step 640, both the up transistor 710 and the downtransistor 730 are causing both the up motor and down motor command fromthe relay logic to be interrupted and a delay of 0.50 second is takenand the position counter is cleared. Control is then transferred to astep 641 in which the transistor 730 is commanded to switch on, startingthe motor moving down and the 1 second force ignore timer is startedrunning. A test is made in a step 642 to determine whether the commandswitch has been activated again. If it has, the force limit setting isincreased in a step 644 following which control is then transferred backto the step 632. If the command switch is not being held down, controlis then transferred to a step 646, testing whether the 1 second forceignore timer has timed out. The last 32 rpm pulses indicative of theforce are ignored and a force period from the previous pulse is acceptedas the down force. Control is then transferred to a step 648 and a testis made to determine whether the movable barrier is at the pass point asindicated by the pass point detector 49 interacting with the opticaldetector 46. Control is then transferred to a step 650. The positioncounter is complemented and the complemented value is stored as the uplimit following which the position counter is cleared and a pass pointflag is set. Control is then transferred back to the step 642. In theevent that the result of the test in step 648 is negative, control istransferred to a step 652 which tests whether the 1 second force delaytimer has expired and whether the force period is greater than the forcelimit setting, indicating that the force has exceeded. If both of thoseconditions have occurred, control is transferred to a step 654 whichtests whether the pass point flag has been set. If it has not been set,control is transferred to a step 656, wherein the position counter iscomplemented and the complemented value is saved as the up limit and theposition counter is cleared. In the event that the pass point flag hasbeen set, control is transferred to a step 658. In the event that thetest in step 652 has been negative, control is transferred to a step 660which tests the value of the obstacle reverse flag. If the obstaclereverse flag has not been set, control is transferred to the step 642shown on FIG. 6B. If the flag has been set, control is transferred tothe step 654.

In a step 658, both transistors 710 and 730 are switched offinterrupting up and down power from the relays to the electric motor 106and halting the motor and the microcontroller 84 then delays for 0.50second. Control is then transferred to a step 660. In step 660, thetransistor 710 is switched on switching on the up relay causing themotor to be turned to drive the door upward and the 1 second forceignore timer is started. Control is transferred to a decision step 662testing for whether the command switch is set. If the command switch isset, control is transferred back to the step 664 causing the force limitsetting to be increased, following which control is transferred to thestep 632, interrupting the motor outputs. If the command switch has notbeen set, control is transferred to the step 664 causing the maximumforce from the 33rd previous reading to be saved as the up force,following which control is transferred to a decision block 666 whichtests for whether the 1 second force ignore timer has expired andwhether the force period is longer than the force limit setting. If bothconditions are true, control is transferred to a step 668. If not,control is transferred to a step 670 which tests for whether the doorposition is at the up limit. If the door position is at the up limit,control is transferred to the step 668, switching off both of the motoroutputs to halt the door and delaying for 0.50 second. If the positiontested in step 670 is not at the upper limit, control is transferredback to the step 662. Following step 668 control is transferred to step674, where the down output is turned on and the 1 second force ignoretimer is started. Control is then transferred to the step 676 duringwhich the command switch is tested. If the command switch is set,control is transferred back to the step 644 causing the force limitsetting to be increased and ultimately to the step 632 which switchesoff the motor outputs and delays for 0.50 second. If the command switchhas not been set, control is transferred to a step 678. If the positioncounter indicates that the door is presently at a point where a forcetransition normally occurs or where force settings are to change, andthe 1 second force ignore timer has expired, the 33rd previous maximumforce is stored and the down force array is filled with the last 33force measurements. Control is then transferred to a step 680 whichtests for whether the obstacle detector reverse flag has been set. If ithas not been set, control is transferred to a step 682 which tests forwhether the 1 second force ignore timer has expired and whether theforce period is longer than the force limit setting. If both thoseconditions are true, control is transferred to a step 684 which testsfor the pass point being set. If the pass point flag was not set,control is transferred to the step 688. In the event that the obstaclereverse flag is set, control is also transferred to the step 686, andthen to 688. In the event that the decision block 682 is answered in thenegative, control is transferred back to the step 676. If the pass pointflag has been set as tested for in the step 684, control is transferredto the step 686 wherein the current door position is saved as the downlimit position. In step 688, both the motor output transistors 710 and730 are switched off, interrupting up and down power to the motor and adelay occurs for 0.50 second. Control is then transferred to the step690 wherein the up transistor 710 is switched on, causing the up relayto be actuated, providing up power to the motor and the 1 second forceignore timer begins running. In the step 692, a test is made for whetherthe command has been set again. If it has, control is transferred backto the step 644, as shown in FIG. 6B, and following that to the step632, as shown in FIG. 6A. If the command switch has not been set,control is transferred to the step 694 which tests for whether theposition counter indicates that the door is at a sectional forcetransition point or barrier and the 1 second force ignore timer hasexpired. If both those conditions are true, the maximum force from thelast sectional barrier is then loaded. Control is then transferred to adecision step 696 testing for whether the 1 second force ignore timerhas timed out and whether the force period is indicated to be longerthan the force period limit setting. If both of those conditions aretrue, control is then transferred to a step 698 causing the motor outputtransistors 710 and 730 to be switched off and all data is stored in thenon-volatile memory 88 and the routine is exited. In the event thatdecision is indicated to be in the negative from the decision step 696,control is transferred to a step 697 which tests whether the doorposition is presently at the up limit position. If it is, control isthen transferred to the step 698. If it is not, control is transferredto the step 692.

In the event that the rpm interrupt step 322, as shown in FIG. 5B, isexecuted, control is then transferred to a step 800, as shown in FIG.9A. In step 800, the time duration from the last rpm pulse from thetachometer 110 is measured and saved as a force period indication.Control is then transferred to a decision block. Control is transferredto the step 802, in which the operator state variable is tested. In theevent that the operator state variable indicates that the operator iscausing the door to travel down, the door is at the down limit or thedoor is in the auto-reverse mode, control is transferred to a step 804causing the door position counter to be incremented. In the event thatthe door operator state indicates that the door is travelling upward,has reached its up limit or has stopped in mid-travel, control istransferred to a step 806 which causes the position counter to bedecremented. Control is then transferred to a decision step 808 in whichthe pass point pattern testing flag is tested for whether it is set. Ifit is set, control is transferred to a step 810 which tests a timer todetermine whether the maximum pattern time allotted by the system hasexpired. In the event that the pass point pattern testing flag is notset, control is transferred to a step 812, testing for whether theoptical obstacle detector flag has been set. If it is not set, theroutine is exited in a step 814. If the obstacle detector flag has beenset, control is transferred to a step 816 wherein the pattern testingflag is set and the routine is exited. In the event that the maximumpattern time has timed out, as tested for in the step 810, control istransferred to a step 820 wherein the optical reverse flag is set andthe routine is exited. In the maximum pattern time has not expired, atest is made in a step 822 for whether the microcontroller has sensedfrom the obstacle detector that the beam has been blocked open within acorrect timing sequence indicative of the pass point detection system.If it has not, the routine is exited in a step 824. If it has, controlis transferred to a step 826. Testing for whether a window flag has beenset. As to whether the rough position of the door would indicate thatthe pass point should have been encountered. If the window flag has beenset, control is transferred to a step 828, testing for whether theposition is within the window flag position. If it has, control istransferred to a step 832, causing the position counter to be cleared orrenormalized or zeroed, setting the window flag and set a flagindicating that the pass point has been found, following which theroutine is exited. In the event that the position is not within thewindow as tested for in step 828, the obstacle reverse flag is set in astep 830 and the routine is exited. In the event that the test made instep 326 indicates that the window flag has not been set, control isthen transferred directly to the step 832.

While there has been illustrated and described a particular embodimentof the present invention, it will be appreciated that numerous changesand modifications will occur to those skilled in the art, and it isintended in the appended claims to cover all those changes andmodifications which fall within the true spirit and scope of the presentinvention.

What is claimed is:
 1. A movable barrier operator comprising:an electricmotor; a transmission connected to the electric motor to be driventhereby and for connection to a movable barrier to be moved with respectto a barrier frame; means for detecting a quantitative indication ofposition of the movable barrier; means for comparing the quantitativeindication of position of the movable barrier to a stored digital end oftravel position and for providing a halt signal in response to thestored digital end of travel position having been exceeded; a controllerfor halting the electric motor in response to the halt signal; a barrierposition signal generator for producing a barrier position signalindicative of the barrier moving past a location fixed with respect tothe barrier frame, the barrier position signal generator comprising abeam emitter and a beam detector disposed to form a beam pathway and anopaque plate extending from the barrier and into the beam pathway whenthe barrier is at the fixed location, wherein the beam detector detectsa break in the beam pathway from the opaque plate; and means forcorrecting the quantitative indication of position according to thebarrier position signal.
 2. A movable barrier operator according toclaim 1, wherein the barrier position signal generator includes:a beamemitter and a beam detector disposed to form a beam pathway from oneside of the frame to the opposite side of the frame, and an opaque plateextending form the barrier and into the beam pathway from an obstacle orfrom the opaque plate.
 3. A movable barrier operator according to claim2, wherein the opaque plate comprises a pass point plate having apattern comprising at least one aperture such that the beam pathway issequentially interrupted and then restored at least once as the barriermoves past the fixed location.
 4. A movable barrier operator accordingto claim 3, wherein the means for detecting a quantitative indication ofposition of the movable barrier includes means for measuring the amountthe motor has turned during movement of the barrier.
 5. A movablebarrier operator according to claim 2, further comprising:a digitalmemory for storing a counter value representing the quantitativeindication of motion of the movable barrier; and barrier motionregistering means for incrementing and decrementing the counter value inresponse to barrier motion in a forward direction and a reversedirection, respectively.
 6. A movable barrier operator according toclaim 5, wherein the correcting means stores a value of zero in thecounter in the digital memory when the barrier position signal generatorprovides a barrier position signal indication that the pass point platehas been detected and the counter is not equal to zero.
 7. A movablebarrier operator according to claim 6, wherein the barrier positionsignal generator generates a barrier position signal in response toobstacle indications from the optical detector only when the countervalue is within a selected numerical window of proximity to zero.
 8. Amovable barrier operator according to claim 1, further comprising:adigital memory for storing a counter value representing the quantitativeindication of motion of the movable barrier; and barrier motionregistering means for incrementing and decrementing the counter value inresponse to barrier motion in a forward direction and a reversedirection, respectively.
 9. A movable barrier operator according toclaim 8 wherein the correcting means stores a specified value in thecounter in the digital memory when the barrier position signal generatorprovides the barrier position signal and the counter is not equal to thespecified value.
 10. A movable barrier operator according to claim 9,further comprising:a switch operatively coupled to the electric motorfor commanding the electric motor to move; and means for changing thestored digital end of travel position when, after halting in response toa halt signal from the comparing means, the motor is commanded to moveby pressing the switch.
 11. A movable barrier operator according toclaim 10, wherein:the digital memory stores at least one said digitalend of travel position, and the changing means changes the storeddigital end of travel position in the digital memory to the value of thecounter when the switch ceases to be pressed.
 12. A movable barrieroperator according to claim 11, wherein:the digital memory stores anup-limit end of travel position and a down-limit end of travel position;the switch is operatively coupled to the electric motor to drive thebarrier up beyond the up-limit end of travel position; the controllercauses the electric motor to close the barrier in the frame in responseto a close signal, and causes the electric motor to open the barrier outof the frame in response to an open signal; the changing means comprisesa microprocessor programmed to provide to the controller a close signalafter changing the up-limit end of travel position, and to store in thedown-limit end of travel position in the digital memory the value of thecounter when the barrier reaches a position in closing in the framebeyond which it cannot move.
 13. A movable barrier operator according toclaim 1, further comprising:a non-volatile digital memory for storing abarrier state value; and reset means for providing a barrier closesignal in response to an interruption of normal power to the barrieroperator in combination with a barrier state value indicating thebarrier is between a fully open and fully closed position; and whereinthe controller activates the electric motor to move the barrier towardthe fully closed position in response to the barrier close signal.
 14. Amovable barrier operator according to claim 13, further comprising anauto-reverse means for providing a barrier open signal when the barrierencounters a resistance to further travel exceeding a predeterminedthreshold while traveling toward the fully closed position, and whereinthe controller activates the electric motor to move the barrier towardthe fully open position in response to the barrier open signal.
 15. Amovable barrier operator according to claim 14, wherein said reset meansprovides to the comparing means a stored digital secondary-up end oftravel position in response to an interruption of normal power to thebarrier operator in combination with a barrier state value indicatingthe barrier is between the fully open and fully closed position, saidstored digital secondary-up end of travel position being equal to thequantitative indication of motion plus a value corresponding toapproximately the distance the barrier must travel from the fully closedposition to the position at which said barrier position signal generatorproduces the barrier position signal.
 16. A movable barrier operatoraccording to claim 14, wherein said auto-reverse means further providesa barrier open signal if the barrier position signal is not generatedand the barrier is halted in the fully closed position by the comparingmeans.
 17. An absolute position controller for a movable barrieroperator, comprising:digital memory means for storing a counter valueindicative of the absolute position of the barrier with respect to abarrier frame; a position indicator for changing the counter value inthe digital memory means in response to barrier motion; a pass pointsignal generator for producing a pass point signal indicative of thebarrier moving past a location fixed with respect to the barrier frame,the pass point signal generator comprising radiation obstacle detectionmeans for detecting an obstacle in the barrier movement path mounted onthe barrier frame, and pass point obstacle means disposed on the barrierat a fixed position, wherein the pass point obstacle detection meansdetects movement of the barrier past the pass point obstacle means atthe fixed position in every cycle of motion of the barrier with respectto the barrier frame; and update means for storing a preselected valueof the counter in the digital memory means in response to the pass pointsignal.
 18. An absolute position controller according to claim 17,wherein the pass point signal generator comprises:radiation obstacledetection means for detecting an obstacle in the barrier movement pathmounted on the barrier frame; and pass point obstacle means disposed onthe barrier at a fixed position, wherein the obstacle detection meansdetects movement of the barrier past the pass point obstacle means atthe fixed position in every cycle of motion of the barrier with respectto the barrier frame.
 19. An absolute position controller according toclaim 18, wherein:the radiation obstacle detection means comprises alight beam emitter and a light beam detector disposed to form a lightbeam pathway from one side of the frame to the opposite side of theframe, and the pass point obstacle means comprises an opaque plateextending from the barrier and into the light beam pathway when thebarrier moves past the opaque plate.
 20. An absolute position controlleraccording to claim 19, wherein the pass point plate has a pattern suchthat the light beam pathway is sequentially interrupted and thenrestored at least once as the barrier moves past the pass point plate,and the pass point signal generator responds to the pattern bygenerating the pass point signal.
 21. An absolute position controlleraccording to claim 20, wherein:the pass point signal generator furthercomprises means for measuring the amount the motor has turned duringeach sequential obstacle indication from the obstacle detection means;and the pass point signal generator provides the pass point signal inresponse to a sequence of obstacle indication motor rotation countscorresponding to the pass point plate.
 22. An absolute positioncontroller according to claim 17, further comprising:second digitalmemory means for storing a barrier-open end-of-travel limit and abarrier-closed end-of-travel limit; and means for generating a haltsignal effective to cause the movable barrier operator to halt thebarrier, in response to the counter attaining a value equal to one ofthe set of the barrier-open end-of-travel limit and the barrier-closedend-of-travel limit.
 23. A method for setting the motion limits of agarage door operator which moves a garage door within a frame,comprising the steps of:initiating a learn mode of said operator;driving the garage door up to a desired up limit; storing a preselectedvalue in a position counter of said operator; driving the garage doordown to a position fixed with respect to the frame; changing theposition counter value relative to the garage door movement; storing theabsolute value of the position counter value to an up limit value;storing said preselected value in the position counter; driving thegarage door down to a fully closed position; optically generating a passpoint, the pass point being of an optically detected pass point, thepass point being effective for normalizing the position of the barrier;changing the counter in response to the pass point signal to effectnormalization of a barrier position indication; changing the positioncounter value relative to the garage door movement; and storing theposition counter value to a down limit value.
 24. A movable barrieroperator having automatic position learn capability comprising:anelectric motor; a transmission connected to the electric motor to bedriven thereby and to a movable barrier to be moved; a controller forgenerating a move signal to enable the transmission to move the barrier;a detector for sensing when the barrier moves past a reference passpoint and for generating a pass point signal representative thereof, thereference point being effective for enabling the controller to normalizethe position of the barrier, the detector comprising an optical emitterfixedly mounted relative to the movable barrier for emitting a lightbeam, and an optical detector mounted on the barrier for detecting thelight beam when the optical detector moves past the light beam duringmovement of the barrier; a memory for storing an open barrier limitposition and a closed barrier limit position; a position indicator,responsive to the pass point signal and to the stored closed barrierlimit position, for generating a signal indicating the relative positionof the barrier with respect to the pass point, the closed barrier limitposition and the open barrier limit position; wherein the controller isresponsive to the position indicator for generating a halt signal toenable the transmission to halt movement of the barrier; and wherein thecontroller includes a learn routine for programming the operator tolearn the closed barrier limit position and for storing the learnedclosed barrier limit in the memory.
 25. The movable barrier operatoraccording to claim 24, wherein the detector comprises:an optical emitterfixedly mounted relative to the movable barrier for emitting a lightbeam; and an optical detector mounted on the barrier for detecting thelight beam when the optical detector moves past the light beam duringmovement of the barrier.
 26. The movable barrier operator according toclaim 25, wherein the optical detector comprises:a pass point detectorcomprising a plate having an aperture, wherein the pass point detectoris positioned on the barrier such that upon movement of the barrier pastthe optical emitter, the pass point detector plate interrupts the lightbeam and allows the light beam to pass through the aperture.
 27. Themoveable barrier operator according to claim 25, further comprising anobstacle detector positioned relative to movement of the barrier fordetecting an obstacle in the path of the barrier and for generating anobstacle signal representative thereof.
 28. A movable barrier operatoraccording to claim 17, wherein:the barrier moves within a frame; and theobstacle detector comprises a light beam emitter and a light beamdetector disposed to form a light beam pathway from one side of theframe to the opposite side of the frame.
 29. A movable barrier operatoraccording to claim 24, further comprising:a digital memory for storing acounter value representing the position relative to the pass point andthe direction of motion of the movable barrier; and barrier motionregistering means for incrementing and decrementing the counter value inresponse to barrier motion in a forward direction and a reversedirection, respectively.
 30. A movable barrier operator comprising:anelectric motor; a transmission connected to the electric motor to bedriven thereby and for connection to a movable barrier to be moved withrespect to a barrier frame; a barrier position detector for detecting aquantitative indication of position of the movable barrier; a comparatorfor comparing the quantitative indication of position of the movablebarrier to a stored digital end of travel position and for providing ahalt signal in response to the stored digital end of travel positionhaving been exceeded; a controller for halting the electric motor inresponse to the halt signal; an optical barrier position signalgenerator for producing a barrier position signal indicative of thebarrier moving past a location fixed with respect to the barrier frame;and wherein the optical barrier position detector, responsive to thebarrier position signal, corrects the quantitative indication of barrierposition according to the barrier position signal.
 31. A movable barrieroperator according to claim 30, further comprising:a switch operativelycoupled to the controller for commanding the electric motor to move; anda learn limit routine executable by the controller for changing thestored digital end of travel position, wherein during continued closureof the switch the electric motor moves and upon opening of the switchthe electric motor stops and the end of travel position is set.